using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Backend.JYD.Model.Credit;

namespace Backend.JYD.EFDAL.Mapping
{
    public class IncurDebtMap : EntityTypeConfiguration<IncurDebt>
    {
        public IncurDebtMap()
        {
            // Primary Key
            this.HasKey(t => t.DebtId);

            // Properties
            this.Property(t => t.CustNo)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("IncurDebt");
            this.Property(t => t.DebtId).HasColumnName("DebtId");
            this.Property(t => t.CustNo).HasColumnName("CustNo");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.Balance).HasColumnName("Balance");
            this.Property(t => t.BeginDate).HasColumnName("BeginDate");
            this.Property(t => t.EndDate).HasColumnName("EndDate");
            this.Property(t => t.Rate).HasColumnName("Rate");
            this.Property(t => t.PayWay).HasColumnName("PayWay");
            this.Property(t => t.AccountStatus).HasColumnName("AccountStatus");
            this.Property(t => t.TaskId).HasColumnName("TaskId");
            this.Property(t => t.TaskDetailId).HasColumnName("TaskDetailId");
        }
    }
}
